//路由入口文件
import router from '../libs/router';
import {
  HomeView,
  DetailView,
  homeScript,
  detailScript
} from '../controllers/Todo';

const routesRules = [
  {
    //切换地址时切换组装数据后的页面
    path: '/',
    view: HomeView,
    script: homeScript
  },
  {
    path: '/detail/:id',
    view: DetailView,
    script: detailScript
  }
];

export default router(routesRules);
